package com.gets.web.repository;

import com.gets.web.model.CommentEntity;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by ddsc on 9/23/2016.
 */
public interface CommentRepository extends JpaRepository<CommentEntity,Integer> {
    @Query("select ce from CommentEntity ce where ce.imageId=:imageId")
    List<CommentEntity> getComment(@Param("imageId")int imageId, Pageable pageable);
}
